package com.ruoyi.apply.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.apply.mapper.ApplyForMapper;
import com.ruoyi.apply.domain.ApplyFor;
import com.ruoyi.apply.service.IApplyForService;

/**
 * 提交申请Service业务层处理
 *
 * @author ruoyi
 * @date 2023-12-01
 */
@Service
public class ApplyForServiceImpl implements IApplyForService
{
    @Autowired
    private ApplyForMapper applyForMapper;

    /**
     * 查询提交申请
     *
     * @param applyId 提交申请主键
     * @return 提交申请
     */
    @Override
    public ApplyFor selectApplyForByApplyId(Long applyId)
    {
        return applyForMapper.selectApplyForByApplyId(applyId);
    }

    @Override
    public ApplyFor selectApplyForByUserId(String userId) {
        return null;
    }

    /**
     * 查询提交申请列表
     *
     * @param applyFor 提交申请
     * @return 提交申请
     */
    @Override
    public List<ApplyFor> selectApplyForList(ApplyFor applyFor)
    {
        return applyForMapper.selectApplyForList(applyFor);
    }

    /**
     * 新增提交申请
     *
     * @param applyFor 提交申请
     * @return 结果
     */
    @Override
    public int insertApplyFor(ApplyFor applyFor)
    {
        return applyForMapper.insertApplyFor(applyFor);
    }

    /**
     * 修改提交申请
     *
     * @param applyFor 提交申请
     * @return 结果
     */
    @Override
    public int updateApplyFor(ApplyFor applyFor)
    {
        return applyForMapper.updateApplyFor(applyFor);
    }

    @Override
    public int deleteApplyForByUserIds(String[] userIds) {
        return 0;
    }

    @Override
    public int deleteApplyForByUserId(String userId) {
        return 0;
    }

    /**
     * 批量删除提交申请
     *
     * @param applyIds 需要删除的提交申请主键
     * @return 结果
     */
    @Override
    public int deleteApplyForByApplyIds(Long[] applyIds)
    {
        return applyForMapper.deleteApplyForByApplyIds(applyIds);
    }

    /**
     * 删除提交申请信息
     *
     * @param applyId 提交申请主键
     * @return 结果
     */
    @Override
    public int deleteApplyForByApplyId(Long applyId)
    {
        return applyForMapper.deleteApplyForByApplyId(applyId);
    }
}
